import Vue from 'vue'
import VueRouter from 'vue-router'
const Home=()=>import('../views/home/home')
const Category=()=>import('../views/category/category')
const Profile=()=>import('../views/profile/profile')
const Cart=()=>import('../views/cart/cart')
const Detail=()=>import('../views/detail/detail')
Vue.use(VueRouter)

const routes = [
	{
		path:"",
		redirect:"/home"
	},
	{
		path:"/category",
		component:Category
	},
	{
		path:"/profile",
		component:Profile
	},
	{
		path:"/cart",
		component: Cart
	},
	{
		path:"/home",
		component:Home
	},
	{
		path:"/detail/:iid",
		component:Detail
	}
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
